"""模拟管理员的类"""

from user import User

class Privileges:
	"""简单模拟权限管理"""

	def __init__(self):
		"""初始化privileges的属性"""
		self.privileges = ['can add post', 'can delete post', 'can ban user']

	def show_privileges(self):
		"""显示管理员权限"""
		print("\nYou have the following permissions:")
		for privilege in self.privileges:
			print(privilege)

class Admin(User):
	"""简单模拟管理员"""

	def __init__(self, first, last, **user_info):
		"""
		初始化父类User的属性。
		再初始化Admin特有的属性。
		"""
		super().__init__(first, last, **user_info)
		self.privileges = Privileges()

		